using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;
//using Castle.ActiveRecord.Queries;
//using NHibernate.Expression;
//using NHibernate.Generics;


#region 'T_RATE_STP' Schema
/*
 * 'TRateStp' class maps to 'T_RATE_STP' table.
 * 	 I_JOURNAL_NO            | Type:NUMBER    | Len:0     | Nullable:F | PK:T | FK:F
 * 	 I_PRCS_CLS              | Type:VARCHAR2  | Len:2     | Nullable:F | PK:F | FK:F
 * 	 I_USER_ID               | Type:VARCHAR2  | Len:10    | Nullable:F | PK:F | FK:F
 * 	 I_PRCS_DATE             | Type:DATE      | Len:0     | Nullable:F | PK:F | FK:F
 * 	 I_PRCS_TIME             | Type:VARCHAR2  | Len:6     | Nullable:F | PK:F | FK:F
 * 	 I_UPD_CLS               | Type:VARCHAR2  | Len:1     | Nullable:F | PK:F | FK:F
 * 	 I_COMPANY_CD            | Type:VARCHAR2  | Len:8     | Nullable:F | PK:T | FK:F
 * 	 I_RATE_CLS              | Type:VARCHAR2  | Len:2     | Nullable:F | PK:F | FK:F
 * 	 I_DL_CURR_CD            | Type:VARCHAR2  | Len:4     | Nullable:F | PK:F | FK:F
 * 	 I_EFF_END_DATE          | Type:NUMBER    | Len:0     | Nullable:F | PK:F | FK:F
 * 	 I_RATE                  | Type:NUMBER    | Len:0     | Nullable:F | PK:F | FK:F
 * 	 I_CNV_METHOD            | Type:VARCHAR2  | Len:1     | Nullable:F | PK:F | FK:F
 * 	 I_ENTRY_DATE            | Type:DATE      | Len:0     | Nullable:T | PK:F | FK:F
 * 	 I_UPD_DATE              | Type:DATE      | Len:0     | Nullable:T | PK:F | FK:F
 * 	 I_PG_ID                 | Type:VARCHAR2  | Len:15    | Nullable:T | PK:F | FK:F
 * 	 I_REF_TIMESTAMP         | Type:VARCHAR2  | Len:17    | Nullable:T | PK:F | FK:F
 */
#endregion
/// <summary>
///	Generated by MyGeneration using the ActiveRecord Object Mapper - 1.0.2
///	Created on 2011/09/14 11:03:50
/// </summary>
namespace Com.GainWinSoft.ERP.Entity
{
    [Serializable]

    public class TRateStpId
    {

        #region Private Members

        private Decimal? iJournalNo;
        private string iCompanyCd;

        #endregion

        #region Constuctor(s)

        public TRateStpId()
        {
            this.iCompanyCd = String.Empty;
            //this.iJournalNo = String.Empty;
            this.iJournalNo = null;
        }
        public TRateStpId(Decimal? iJournalNo, string iCompanyCd)
        {
            this.iCompanyCd = iCompanyCd;
            this.iJournalNo = iJournalNo;
        }
        #endregion // End of Class Constuctor(s)

        #region Public Properties



        [KeyProperty(Column = "I_COMPANY_CD", Length = 8)]
        public virtual string ICompanyCd
        {
            get { return iCompanyCd; }
            set { iCompanyCd = value; }
        }

        [KeyProperty(Column = "I_JOURNAL_NO", Length = 10)]
        public virtual Decimal? IJournalNo
        {
            get { return iJournalNo; }
            set { iJournalNo = value; }
        }

        #endregion


        #region Equals, HashCode and ToString overrides

        /// <summary>
        /// Local implementation of Equals based on unique value members
        /// </summary>
        public override bool Equals(object obj)
        {
            if (this == obj) return true;
            if ((obj == null) || (obj.GetType() != this.GetType())) return false;
            TRateStpId castObj = (TRateStpId)obj;
            return (castObj != null) &&
                (this.iCompanyCd == castObj.iCompanyCd) &&
                (this.iJournalNo == castObj.iJournalNo);
        }

        /// <summary>
        /// Local implementation of GetHashCode based on unique value members
        /// </summary>
        public override int GetHashCode()
        {

            int hash = 57;
            hash = 27 * hash * iCompanyCd.GetHashCode();
            hash = 27 * hash * iJournalNo.GetHashCode();
            return hash;
        }

        /// <summary>
        /// Local implementation of ToString based on class members
        /// </summary>
        public override String ToString()
        {
            StringBuilder sbuffer = new StringBuilder();
            sbuffer.Append("{");

            sbuffer.AppendFormat("JournalNo = {0}, ", iJournalNo);
            sbuffer.AppendFormat("CompanyCd = {0}, ", iCompanyCd);
            
            sbuffer.Append(" }");
            return sbuffer.ToString();
        }

        #endregion
    }


}
